﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace GeoPlugin
{
    /// <summary>
    /// Interaction logic for MapControl.xaml
    /// </summary>
    public partial class MapControl : UserControl
    {
        public MapControl(UserControl MapViewBox, String mapName)
        {
            InitializeComponent();
            //MapHandlers.AddClickHandlerForMap(image, mapName);
          //  image.Opacity = 0.7;
            this.MainGrid.Children.Add(MapViewBox);
        }

        public void GoToInnerMap(UserControl mapViewBox)
        {
            this.Opacity = 0;
            ((ObjectControl)((Grid)this.Parent).Parent).MainGrid.Children.Add(mapViewBox);
            GeoPlugin.IncreaseBackButtonLevel();
        }
    }
}
